import store from '@/store/store'

const permission = function (value) {
  const permissionList = store.state.user.user.permissionList
  const hasPermission = permissionList.some(role => role === value)
  return hasPermission
}

export default permission